{% extends "adminbase.html" %}


{% block main_title %}
<h1>Updates</h1>
<small>
Text: just write what you want<br/>
Video: Post a <a href="http://www.youtube.com/" target="_blank">Youtube</a> link<br/>
Audio: Post a <a href="http://www.soundcloud.com/" target="_blank">Soundcloud</a> embed code (choose 'share' then copy the embed code, deselect "user html5 widget")<br/>
</small>
{% endblock %}

{% block main_subtitle %}{% endblock %}

{% block main_content %}
<form action="/admins/postUpdateAdmin/" method="POST">{% csrf_token %}
	<input type="text" name="entry" size=80/>
	<input type="submit" value="Post"><br/><br/>
	<br />
	</form>

	{% for update in updates %}
	{%  if update.video_id %}
		<li><iframe width="560" height="315" src="http://www.youtube.com/embed/{{ update.video_id }}" frameborder="0" allowfullscreen></iframe> </li><br />
	{% endif %}
	{% if update.content %}
		<li>{{ update.content }}</li> <br></br>
	{% endif %}
	{% if update.mp3_url %}
	<li>
	{{ update.mp3_name }}
	<object height="100" width="100%"> 
		<param name="movie" value={{ update.mp3_url }}/> 
	</object> 
	</li>
	{% endif %}
	<br />
	{% endfor %}
{% endblock %}
